<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Spec::Story::Runner::StoryMediator::Story</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Spec::Story::Runner::StoryMediator::Story</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../../../files/vendor/plugins/rspec/lib/spec/story/runner/story_mediator_rb.html">
                vendor/plugins/rspec/lib/spec/story/runner/story_mediator.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../../../../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000103">add_scenario</a>&nbsp;&nbsp;
      <a href="#M000104">current_scenario</a>&nbsp;&nbsp;
      <a href="#M000101">new</a>&nbsp;&nbsp;
      <a href="#M000102">to_proc</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000101" class="method-detail">
        <a name="M000101"></a>

        <div class="method-heading">
          <a href="#M000101" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(title, narrative, step_group, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000101-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_mediator.rb, line 63</span>
63:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">title</span>, <span class="ruby-identifier">narrative</span>, <span class="ruby-identifier">step_group</span>, <span class="ruby-identifier">options</span>)
64:             <span class="ruby-ivar">@title</span> = <span class="ruby-identifier">title</span>
65:             <span class="ruby-ivar">@narrative</span> = <span class="ruby-identifier">narrative</span>
66:             <span class="ruby-ivar">@scenarios</span> = []
67:             <span class="ruby-ivar">@step_group</span> = <span class="ruby-identifier">step_group</span>
68:             <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
69:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000103" class="method-detail">
        <a name="M000103"></a>

        <div class="method-heading">
          <a href="#M000103" class="method-signature">
          <span class="method-name">add_scenario</span><span class="method-args">(scenario)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000103-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_mediator.rb, line 83</span>
83:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_scenario</span>(<span class="ruby-identifier">scenario</span>)
84:             <span class="ruby-ivar">@scenarios</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">scenario</span>
85:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000104" class="method-detail">
        <a name="M000104"></a>

        <div class="method-heading">
          <a href="#M000104" class="method-signature">
          <span class="method-name">current_scenario</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000104-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_mediator.rb, line 87</span>
87:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_scenario</span>
88:             <span class="ruby-ivar">@scenarios</span>.<span class="ruby-identifier">last</span>
89:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000102" class="method-detail">
        <a name="M000102"></a>

        <div class="method-heading">
          <a href="#M000102" class="method-signature">
          <span class="method-name">to_proc</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000102-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_mediator.rb, line 71</span>
71:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_proc</span>
72:             <span class="ruby-identifier">title</span> = <span class="ruby-ivar">@title</span>
73:             <span class="ruby-identifier">narrative</span> = <span class="ruby-ivar">@narrative</span>
74:             <span class="ruby-identifier">scenarios</span> = <span class="ruby-ivar">@scenarios</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">scenario</span><span class="ruby-operator">|</span> <span class="ruby-identifier">scenario</span>.<span class="ruby-identifier">to_proc</span> }
75:             <span class="ruby-identifier">options</span> = <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">:steps_for</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@step_group</span>)
76:             <span class="ruby-identifier">lambda</span> <span class="ruby-keyword kw">do</span>
77:               <span class="ruby-constant">Story</span> <span class="ruby-identifier">title</span>, <span class="ruby-identifier">narrative</span>, <span class="ruby-identifier">options</span> <span class="ruby-keyword kw">do</span>
78:                 <span class="ruby-identifier">scenarios</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">scenario</span><span class="ruby-operator">|</span> <span class="ruby-identifier">instance_eval</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">scenario</span>) }
79:               <span class="ruby-keyword kw">end</span>
80:             <span class="ruby-keyword kw">end</span>
81:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>